package com.fangfei.runtest.worker;

import com.fangfei.runtest.Config.TestConfig;
import com.fangfei.runtest.model.TestModel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class TestTask implements Runnable{
    private static final Logger logger = LoggerFactory.getLogger(TestTask.class);

    private TestConfig testConfig;

    private int taskId;

    public TestTask(int taskId, TestConfig testConfig){
        this.taskId = taskId;
        this.testConfig = testConfig;
    }

    @Override
    public void run() {

        try {
            TestModel testmode = new TestModel(testConfig);
            testmode.start();
            logger.info("run end taskId =" + this.taskId);
            Thread.sleep(1*1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
